Add asciidoc output option to docs-builder changelog render command#2452
Merged
Add asciidoc output option to docs-builder changelog render command#2452
Conversation
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Felipe Cotti <felipe.cotti@elastic.co>
Co-authored-by: Felipe Cotti <felipe.cotti@elastic.co>
Co-authored-by: Felipe Cotti <felipe.cotti@elastic.co>
Co-authored-by: Felipe Cotti <felipe.cotti@elastic.co>
Co-authored-by: Felipe Cotti <felipe.cotti@elastic.co>
Co-authored-by: Felipe Cotti <felipe.cotti@elastic.co>
Co-authored-by: Felipe Cotti <felipe.cotti@elastic.co>
Co-authored-by: Felipe Cotti <felipe.cotti@elastic.co>
2 tasks
* Improve changelog bundle --output * Fix changelog render with multiple input * More fixes * Fix PR link resolution * Make hide-private-links bundle-specific
…og-manifest-asciidoc # Conflicts: # docs/cli/release/changelog-render.md # docs/contribute/changelog.md # src/services/Elastic.Documentation.Services/ChangelogService.cs # src/tooling/docs-builder/Commands/ChangelogCommand.cs
Contributor
|
I've solved conflicts with the base branch. Prior to merging this one, can we add some tests? |
Contributor
Author
Thanks!
I made these updates in b9ff19b : SummaryAdded two tests for the
Both tests:
The tests verify that the asciidoc render command creates a single, valid asciidoc file as expected. |
cotti
approved these changes
Jan 14, 2026
Combines both branches' features: - Asciidoc rendering support for changelog render command - Add blockers (add_blockers) configuration for blocking changelog creation - Multi-PR support with --prs option supporting multiple PRs - Full-page search functionality - Various infrastructure and API improvements
🔍 Preview links for changed docs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--file-typeoption tochangelog rendercommandOverview
Added support for rendering changelogs to asciidoc format in addition to markdown.
The
docs-builder changelog rendercommand now accepts a--file-typeoption that can output either markdown (default) or asciidoc files.This functionality is based on the "--file_type" option in https://github.com/elastic/elastic-agent-changelog-tool and the
gradlew generateReleaseNotescommand in the 8.19 branch of the elasticsearch repo.Examples
4. Refresh the binaries, per https://github.com/elastic/docs-builder/blob/main/README.md. For example:
./build.sh clean ./build.sh publishbinaries cd .artifacts/publish/docs-builder/release/changelog addcommand:```sh
./docs-builder changelog add --prs ~/path/to/8.19.10.txt --repo elasticsearch --owner elastic --products "elasticsearch 8.19.10" --config ~/path/to/changelog.yml --output ~/path/to/elasticsearch/docs/changelog/new/
The resulting file in this case is as follows:
When it is substituted for the existing file, it renders successfully. For example:
Code changes
1. Command Interface (
src/tooling/docs-builder/Commands/ChangelogCommand.cs)--file-typeparameter to theRendercommandfile-typeis either"markdown"or"asciidoc"2. Input Model (
src/services/Elastic.Documentation.Services/Changelog/ChangelogRenderInput.cs)FileTypeproperty (defaults to"markdown")3. Service Implementation (
src/services/Elastic.Documentation.Services/ChangelogService.cs)New Methods:
RenderAsciidoc()- Main method that generates a single asciidoc file with all sectionsRenderEntriesByAreaAsciidoc()- Renders entries grouped by component/area in asciidoc formatRenderBreakingChangesAsciidoc()- Renders breaking changes in asciidoc formatRenderDeprecationsAsciidoc()- Renders deprecations in asciidoc formatRenderKnownIssuesAsciidoc()- Renders known issues in asciidoc formatFormatPrLinkAsciidoc()- Formats PR links as asciidoc attribute referencesFormatIssueLinkAsciidoc()- Formats issue links as asciidoc attribute referencesConvertRepoToAttributeName()- Converts repository names to asciidoc attribute formatModified methods
RenderChangelogs()- Updated to route to appropriate renderer based onfile-type:asciidoc: callsRenderAsciidoc()to generate a single.asciidocfilemarkdown(default): calls existing markdown renderers to generate multiple.mdfiles4. Asciidoc format details
The asciidoc output follows patterns from Elasticsearch release notes:
[float]attributes for subsections::(e.g.,Data streams::){repo-pull}NUMBER[#NUMBER]and{repo-issue}NUMBER[#NUMBER]Documentation updates
1.
docs/cli/release/changelog-render.md--file-typeoption documentationindex.md,breaking-changes.md,deprecations.md,known-issues.md).asciidocfile with all sections2.
docs/contribute/changelog.md--file-typeoption--file-type asciidocusageTesting
For new tests added, go to #2452 (comment)
Usage Examples
Markdown (default):
docs-builder changelog render \ --input "./changelog-bundle.yaml,./changelogs,elasticsearch" \ --title 9.2.2 \ --output ./release-notesAsciidoc:
docs-builder changelog render \ --input "./changelog-bundle.yaml,./changelogs,elasticsearch" \ --title 9.2.2 \ --output ./release-notes \ --file-type asciidocBackward Compatibility
--file-typedefaults to"markdown"if not specifiedGenerative AI disclosure
Tool(s) and model(s) used: composer-1 agent